package org.eduapp.trains.service.announce;

import org.eduapp.trains.ServiceException;
import org.eduapp.trains.model.announce.ModelAnnounce;
import org.eduapp.trains.web.support.PaginationSupport;

/**
 * 
 * @author jeccy
 *
 */
public interface AnnounceService {
	
	/**
	 * Get announce model by given id
	 * @param id
	 * @return
	 * @throws ServiceException
	 */
	ModelAnnounce get (String id) 
		throws ServiceException;
	
	/**
	 * Get announce models by pager
	 * @param model
	 * @param pageSize
	 * @param offset
	 * @param order
	 * @param isDesc
	 * @return
	 * @throws ServiceException
	 */
	PaginationSupport<ModelAnnounce> get (ModelAnnounce model, int pageSize, int offset, String order, Boolean isDesc) 
		throws ServiceException;
	
	/**
	 * Save or update a announce model
	 * @param model
	 * @return
	 * @throws ServiceException
	 */
	boolean saveOrUpdate (ModelAnnounce model) 
		throws ServiceException;
	
	/**
	 * Remove announce by given id
	 * @param id
	 * @return
	 * @throws ServiceException
	 */
	boolean remove (String id) 
		throws ServiceException;
	
}
